#+TITLE: ACPI README

** Prerequisites
   In order to get ACPI working you'll only need a few things:
   - ACPI (comes with Dragora)
   - The stuff in this directory
     - =default.sh=
     - =anything=
   - pm-utils
     - this can be found in =tools/pm-utils=

** Explanation
   By default, acpi isn't configured for anything on the base install of D3
   Alpha 2 (this might change by the final release), therefore, we must do
   things to get it to work the way we wish. We are going to make it so that
   when you close the lid of your C201, it suspends; when you open the lid, it
   wakes up; when you plug in headphones, it switches alsa to the output
   driver; and when you unplug headphones, it switches alsa back to built-in
   speaker output.

   In order to do this, you must first get the 2 files in this directory, listed
   above. Place =default.sh= into =/etc/acpi/=, and keep the name the
   same. Next, take =anything= and place it into =/etc/acpi/events/= - this is
   an event file and will tell acpi what to do when an event is executed. Since
   we are only dealing with 2 types of events, lid and headphone jack, we don't
   need to make separate events; although, you could, if you wanted.

   acpi doesn't start upon booting by default, so if you want that, you can
   create an =/etc/rc.d/rc.acpi= file with the following command:
   =acpid -e /etc/acpi/events/anything=. This will tell acpi what event file to
   use, although, I believe it defaults to =/etc/acpi/events/= anyways.

   If you haven't already installed pm-utils, see the section below. Otherwise,
   you're ready to go!

*** pm-utils
    In order for your machine to actually suspend upon lid closing, you'll need
    to install the pm-utils package. If it isn't already made and bundled, just
    build the recipe listed above. pm-utils has a nice command called
    =pm-suspend=, which will suspend the machine by loading stuff into RAM (I
    think). Once that is installed, you're done!
